#!/bin/sh

# $1: directory
is_empty_dir() {
        for FILE in $1/* $1/.*
        do
                case "$FILE" in
                  "$1/.*") return 0 ;;
                  "$1/*"|"$1/."|"$1/..") continue ;;
                  *) return 1 ;;
                esac
        done
        return 0
}

